package com.yuanchu.store.dto;

import com.yuanchu.common.validator.ValidationGroups;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.util.List;

@Data
public class AddressDto {
    @NotEmpty(message = "收货人不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String name;
    @NotEmpty(message = "电话不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String phone;
    private List<Region> region;
    @NotEmpty(message = "详细地址不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String detail;

    // 商家地址
    private List<Integer> cascader;
    private Integer sort;
    private Integer type;

    @Data
    public static class Region {
        private String label;
        private int value;
    }
}
